﻿#include "Application.h"
#include "CreateExecutioner.h"
#include "Executioner.h"

void CreateExecutioner::Execute()
{
  _parser.SetPrefix("Executioner/");

  Configuration cfg;
  cfg.Add<Application*>("_app", &_app);
  cfg.Add<Parser*>("_parser", &_parser);
  auto type = cfg.Get<std::string>("type");

  _app.GetExecutioner() = ObjectFactory::Make<Executioner>(type, cfg);
  console::Success("CreateExecutioner");
}
